﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using GenericLibrariesToolKit;
using GenericLibrariesToolKit.Enumeration;
using Model;
using BLL.Users;
using BLL.Users.Impl;
using Utils;
public partial class Page_Security_RoleReview : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
            showRegisterCheckList();
    }
    /// <summary>
    /// 显示需要审核注册用户在列表中
    /// </summary>
    public void showRegisterCheckList()
    {
        int isAuditing=0;
        int visible=1;
        //设置where查询条件
        WhereCondition[] whereCondition = new WhereCondition[]
        {
            new WhereCondition(WhereJoinType.NULL,"IsAuditing",MatchType.EQUAL,isAuditing),
            new WhereCondition(WhereJoinType.AND,"Visible",MatchType.EQUAL,visible),
        };

        Dictionary<string, string> orderBy = new Dictionary<string, string>();
        orderBy.Add("RegisterDate","desc");

        //执行sql语句
        UserBO userBO = new UserBOImpl();
        DataSet resultuser = userBO.GetDataSet(-1, -1, whereCondition, orderBy);
        //数据绑定到gridview
        gvRegisterCheckView.DataSource = resultuser;
        gvRegisterCheckView.DataBind();
    }
    //分页处理
    protected void gvRegisterCheckView_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        this.gvRegisterCheckView.PageIndex = e.NewPageIndex;
        this.gvRegisterCheckView.DataBind();
    }
    //返回主页面
    protected void btnRegisterCheckListBack_Click(object sender, ImageClickEventArgs e)
    {
        Response.Write("<script language=javascript>history.go(-2);</script>");
    }
}